Modeling languages such as the unified modeling language provide a variety of model types for describing properties of a modeled system. A class model models the underlying data model of a system in an object oriented manner. A class model specifies elements of modeling languages and dependencies between the elements. Class models have diagrammatic syntax and therefore allow people without skills in computer science to model data.
The limited expressiveness of diagrammatic models often means that class models produced by graphical specification are often under-specified with respect to the system modeled. The term under-specified is used here to indicate that instances of the model can exist which do not conform to objects in the modeled system. Textual constraints are therefore used to express details that are either difficult or impossible to express diagrammatically. Thus in the development of code from a class model, constraints are helpful to make the model consistent with the modeled system.
FIG. 1 shows a flow diagram illustrating the steps involved in the state of the art development process 100. In a step 102, a model is created. This can be performed graphically by a model developer. In a step 104 constraints are added to the model. The step 104 is carried out by a constraints expert. In a step 106, the constraints are checked for correct syntax and types. If the checks are not passed in a step 108, the constraints are refined in a step 110 and potentially new constraints are added in step 104. If the checks are passed in step 108, the method moves to a step 112 in which code is generated from the model and the constraints. In a step 114, the generated code is tested. The knowledge of a test expert is used for the test code step 114. The step 114 checks that the constraint specification for the model is valid. If the test is not passed, in a step 116 the method moves back to step 110 in which the constraints are refined. If the test in step 114 is passed, the method moves from step 116 to a step 118 in which the code is deployed.
The development process 100 shown in FIG. 1 uses the expertise of a constraint expert and a test expert in addition to the knowledge of the model developer.